<?php


use Illuminate\Support\Facades\Route;

Route::namespace('admin')->group(function (){
    //需要登录并且进行鉴权
    Route::prefix('admin')->middleware('checkAdminLoginAndCheAuth')->group(function (){
        Route::any('/','HomeController@index')->name('admin.main');


        Route::any('/users','UsersController@users')->name('admin.users.users');
        Route::any('/users_recharge','UsersController@recharge')->name('admin.users.recharge');
        Route::any('/edit_user','UsersController@edit')->name('admin.users.edit');



        Route::any('/orders','OrdersController@orders')->name('admin.orders.orders');



        Route::any('/settings','SettingsController@settings')->name('admin.settings.settings');


        Route::any('/recharge','RechargeOrderController@recharge')->name('admin.recharge.recharge');
        Route::any('/audit_recharge','RechargeOrderController@audit')->name('admin.recharge.audit');




        Route::any('/withdrawal','WithdrawalController@withdrawal')->name('admin.withdrawal.withdrawal');
        Route::any('/audit_withdrawal','WithdrawalController@audit')->name('admin.withdrawal.audit');

        Route::any('/sys_name','SettingsController@sys_name')->name('admin.recharge.sys_name');


    });




    //不需要登录的后台接口
    Route::prefix('admin')->group(function (){
        Route::any('login','LoginController@login')->name('admin.login');//后台用户登录
        Route::any('logout','LoginController@logout')->name('admin.logout');//后台用户登录
        Route::any('home','HomeController@home')->name('admin.home');//后台用户登录
    });
});
